package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"strings"
)

const todoFile = "todo.sample"

func main() {
	// Read the todo list into b.
	b, err := ioutil.ReadFile(todoFile)
	if err != nil {
		log.Fatal(err)
	}

	// Split b into items.
	items := strings.Split(string(b), "\n")

	// List the items.
	for i, s := range items {
		fmt.Printf("%d %s\n", i, s)
	}
}
